package com.fxkj.cloud.drms.ui.mqtt.model;

/**
 * <p>description: mqtt消息体</p>
 * @author ww
 * @date 2025/3/17 11:19
 */
public class AbstractMqttMsg<T> {

    /**
     * 时间戳
     */
    protected final Long ts;

    /**
     * 消息体
     */
    protected final T values;

    public AbstractMqttMsg(Long ts, T values) {
        this.values = values;
        if (null == ts) {
            throw new IllegalArgumentException("ts is null");
        }
        this.ts = ts;
    }

    public Long getTs() {
        return ts;
    }

    public T getValues() {
        return values;
    }

}
